﻿@{
    ViewBag.Title = "Index";
    Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link href="~/Scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
    <link href="~/scripts/miniui/themes/jqueryui-cupertino/skin.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="~/content/css/nav_low.css">
    <script src="~/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="~/Scripts/miniui/miniui.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.color.js" type="text/javascript"></script>
    <script src="~/Scripts/shared/userboot.js" type="text/javascript"></script>
    <link href="~/themes/flexymenu/css/flexy_index.css" rel="stylesheet"> 
    <link href="~/themes/flexymenu/css/flexy-menu.css" rel="stylesheet">    
    <script type="text/javascript" src="~/themes/flexymenu/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="~/themes/flexymenu/js/flexy-menu.js"></script>
    <script type="text/javascript">$(document).ready(function () { $(".flexy-menu").flexymenu({ speed: 400, indicator: true }); });</script>
    <style>
        body
        {
            padding:0;border:0;margin:0;
            width:100%;height:100%;overflow:hidden;
            font-family:Verdana;
            font-size:12px;    
            line-height:22px;
        }        
    </style>
</head>
<body>
<!--flexymenu-->
<div class="content">
    <ul class="flexy-menu orange">
        <li><a href="JavaScript:void(0)"><i class="icon-heart"></i>基本资料</a>
            <ul>
                <li><a href="javascript:showTabById('goodslist','商品资料','../GoodClass/GoodClassList');">商品分类</a></li>
                <li><a href="javascript:showTabById('goodslist','商品资料','../Goods/GoodsList');">商品资料</a></li>
                <li><a href="javascript:showTabById('brand','品牌资料','../Brand/Brand');">品牌资料</a></li>
                <li><a href="javascript:showTabById('custome','客户资料','../Custom/Custom');">客户资料</a></li>
                <li><a href="javascript:showTabById('purchase','供应商资料','../Supply/Supply');">供应商资料</a></li>
                <li><a href="javascript:showTabById('storage','门店资料','../Stock/Stock');">门店资料</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-cogs"></i>采购管理</a>
            <ul>
                <li><a href="javascript:showTabById('InsData','采购入库','../Bill/InsData?datatype=1&billid=0');">采购入库</a></li>
                <li><a href="javascript:showTabById('InrData','采购退货','../Bill/InsData?datatype=-1&billid=0');">采购退货</a></li>
                <li><a href="javascript:showTabById('BllListIns','采购单据列表','../Report/BllListIns?datatype=1');">采购单据列表</a></li>
                <li><a href="javascript:showTabById('BllDetailIns','采购明细查询','../Report/BllDetailIns?datatype=1');">采购明细查询</a></li>
                <li><a href="javascript:showTabById('RptDataSumIns','供应商供货汇表','../Report/RptDataSumIns?datatype=1001');">供应商供货汇表</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-th"></i>零售管理</a>
            <ul>
                <li><a href="javascript:showTabById('RptPosClassSum','收银汇总表','../Report/RptPosClassSum');">收银汇总表</a></li>
                <li><a href="javascript:showTabById('RptPosDataDetail','收银流水查询','../Report/RptPosDataDetail');">收银流水查询</a></li>
                <li><a href="javascript:showTabById('RptPosPayDetail','付款方式明细','../Report/RptPosPayDetail');">付款方式明细</a></li>
                <li><a href="javascript:showTabById('RptPosGoodsSum','商品销售排行','../Report/RptPosGoodsSum');">商品销售排行</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-th"></i>批发管理</a>
            <ul>
                <li><a href="javascript:showTabById('OutData','销售出库','../Bill/OutData?datatype=2&billid=0');">销售出库</a></li>
                <li><a href="javascript:showTabById('OutDataRt','销售退货','../Bill/OutData?datatype=-2&billid=0');">销售退货</a></li>
                <li><a href="javascript:showTabById('BllListOut','销售单据列表','../Report/BllListOut?datatype=2');">销售单据列表</a></li>
                <li><a href="javascript:showTabById('BllDetailOut','销售明细查询','../Report/BllDetailOut?datatype=2');">销售明细查询</a></li>
                <li><a href="javascript:showTabById('RptDataSumOut','客户销售汇总','../Report/RptDataSumOut?datatype=2001');">客户销售汇总</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-bullhorn"></i>库存管理</a>
            <ul>
                <li><a href="javascript:showTabById('InvData','库存调整','../Bill/InvData?datatype=3&billid=0');">库存调整</a></li>
                <li><a href="javascript:showTabById('BllListInv','库存调整单列表','../Report/BllListInv?datatype=3');">库存调整单列表</a></li>
                <li><a href="javascript:showTabById('BllDetailInv','库存调整单明细','../Report/BllDetailInv?datatype=3');">库存调整单明细</a></li>
                <li><a href="javascript:showTabById('StcData','库存盘点','../Bill/StcData?datatype=4&billid=0');">库存盘点</a></li>
                <li><a href="javascript:showTabById('BllListStc','库存盘点单列表','../Report/BllListStc?datatype=4');">库存盘点单列表</a></li>
                <li><a href="javascript:showTabById('BllDetailStc','库存盘点单明细','../Report/BllDetailStc?datatype=4');">库存盘点单明细</a></li>
                <li><a href="javascript:showTabById('RptStockTotal','商品库存情况','../Report/RptStockTotal?datatype=4001');">商品库存情况</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-envelope"></i>会员管理</a>
            <ul>
                <li><a href="javascript:showTabById('Member','会员资料','../Member/Member');">会员资料</a></li>
                <li><a href="javascript:showTabById('Coupon','礼券资料','../Coupon/Coupon');">礼券资料</a></li>
                <li><a href="javascript:showTabById('MemberPoint','会员积分','../Member/MemberPayInfo?type=1');">会员积分</a></li>
                <li><a href="javascript:showTabById('MemberPay','会员充值','../Member/MemberPayInfo?type=0');">会员充值</a></li>
                <li><a href="javascript:showTabById('MemberPayDetail','充值明细','../Member/MemberPay?type=0');">充值明细查询</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-envelope"></i>商城管理</a>
            <ul>
                <li><a href="javascript:showTabById('AdvertiseList','首页设置','../Mall/AdvertiseList')">首页设置</a></li>
            </ul>
        </li>
        <li><a href="JavaScript:void(0)"><i class="icon-th"></i>报表分析</a>
            <ul>
                <li><a href="JavaScript:void(0)">采购报表</a>
                    <ul>
                        <li><a href="javascript:showTabById('RptInsPrice','进货价分析','../Report/RptInsPrice');">进货价分析</a></li>
                        <li><a href="javascript:showTabById('RptInsAnalysis','进货月统计','../Report/RptInsAnalysis');">进货月统计</a></li>
                    </ul>
                </li>
                <li><a href="JavaScript:void(0)">销售报表</a>
                    <ul>
                        <li><a href="javascript:showTabById('RptSaleMonth','销售月统计','../Report/RptSaleMonth');">销售月统计</a></li>
                        <li><a href="#">进货月统计</a></li>
                    </ul>
                </li>
                <li><a href="JavaScript:void(0)">零售报表</a></li>
            </ul>
        </li>
    </ul>
</div>
<!--flexymenu-->

<div id="mainTabs" class="mini-tabs bg-toolbar" activeIndex="0" style="width:100%;height:92%;"      
    bodyStyle="border:0;background:White;" maskOnLoad="false" contextMenu="#tabsMenu" tabPosition ="top"> 
    <div name="tabdesktop" title="系统导航">

    </div>
</div>   

<span id=localtime></span>

<ul id="tabsMenu" class="mini-contextmenu" onbeforeopen="onBeforeOpen">        
    <li onclick="closeTab">关闭标签页</li>                
	<li onclick="closeAllBut">关闭其他标签页</li>
	<li onclick="closeAll">关闭所有标签页</li>        
    <li onclick="showAtPos">显示消息提醒</li> 
</ul>
<input type="hidden" id ="FSystemAppID" name="FSystemAppID" value="@ViewBag.FSystemAppID" />
<input type="hidden" id ="FAppName" name="FAppName" value="@ViewBag.FAppName" />
<input type="hidden" id ="FAppCode" name="FAppCode" value="@ViewBag.FAppCode"/>
<div id="win1" class="mini-window" title="消息提醒" style="width:220px;height:300px;" 
    showMaxButton="true" showCollapseButton="true" showShadow="true"
    showToolbar="true" showFooter="true" showModal="false" allowResize="true" allowDrag="true">
    <div class="mini-fit" >
        <div id="datagrid1" class="mini-datagrid" style="width:95%;height:95%; top: 5px; left: 10px;"
            borderStyle="border:0;" url=""
            showPager = "false" showPageSize="false" showPageIndex="false"showColumns ="false"
            allowCellEdit="true"showHGridLines="false" showVGridLines="false">
            <div property="columns">                                                         
                <!--<div field="FName" width="100px" headerAlign="center" >名称</div>-->
                <div name="lname" width="100%" headerAlign="left">#</div>
            </div>
        </div>
    </div> 
</div>

<script type="text/javascript">
       mini.parse();

       var tabs = mini.get("mainTabs");
       var currentTab = null;
       loadDesktop();

       var grid = mini.get("datagrid1");

       tabs.on("beforecloseclick", function (e) {
           if (e.tab.name == "tabdesktop") {
               e.cancel = true;
           }
       });

       grid.on("drawcell", function (e) {
           var record = e.record,
           column = e.column,
           field = e.field,
           value = e.value;

           //action列，超连接操作按钮
           if (column.name == "lname") {
               e.cellStyle = "text-align:left";
               //e.cellHtml = '<a href="javascript:edit(\'' + record.FQty + '\')">' + record.FName + '</a>';

               var mhtml = '<a href="javascript:parent.rightFrame.showTabById('
                   + "'" + record.FrmName + "','" + record.FCaption + "','" + record.FUrl + "');"
                   + '"target="rightFrame" style="color: #000080">' + record.FName + '(</a>'
                   + '<a style="color: #FF0000">' + record.FQty + '</a><a style="color: #000080">)</a>';
               e.cellHtml = mhtml;
           }
       });

       function getSystemAppID() {
           var mySysAppID = $("#FSystemAppID").val();
           return mySysAppID;
       }

       function getSystemAppName() {
           var mySysAppName = $("#FAppName").val();
           return mySysAppName;
       }

       function getSystemAppCode() {
           var mySysAppCode = $("#FAppCode").val();
           return mySysAppCode;
       }

       function showAtPos() {
           var win = mini.get("win1");
           var x = "right";
           var y = "bottom";
           win.showAtPos(x, y);
       }

       function hideAtPos() {
           var win = mini.get("win1");
           win.hide();
       }

       function loadDesktop() {
           var tab = tabs.getTab("tabdesktop");
           //tabs.loadTab("../Home/desktopbootstrap", tab);
           tabs.loadTab("../Home/desktopwin8", tab);
       }

       function gotoLogin() {
           //当前用户失效，要重新登陆，否数据有问题
           //alert("当前用户与服务器失去连接，请重新登陆！");
           //parent.window.location.href = "default.aspx";
       }

       function reLogin() {
           //$.ajax({
           //    url: '/Data/AjaxService.aspx?method=LoginAgain',
           //    dataType: 'text',
           //    async: false,
           //    success: function (text) {
           //        var mdata = mini.decode(text);
           //        if (mdata.userid == "") {
           //            parent.window.location.href = "default.aspx";
           //        }
           //    }
           //});
       }

       function showTabById(tabid, tabtext, url) {
            var id = "tab$" + tabid;
            var tab = tabs.getTab(id);
            if (!tab) {
                tab = {};
                tab.name = id;
                tab.title = tabtext;
                tab.showCloseButton = true;
                if (url.indexOf("?") > 0)
                {
                    tab.url = url;
                }
                tab.url = url;
                tabs.addTab(tab);
            }
            tabs.activeTab(tab);
       }

       function closeTab() {
           if (currentTab.name != 'tabdesktop') {
               tabs.removeTab(currentTab);
           }
       }
       function closeAllBut() {
           var but = [currentTab];
           but.push(tabs.getTab("tabdesktop"));
           tabs.removeAll(but);
       }
       function closeAll() {
           var tab = tabs.getTab("tabdesktop");
           tabs.removeAll(tab);
       }

       function onBeforeOpen(e) {
           currentTab = tabs.getTabByEvent(e.htmlEvent);
           if (!currentTab) {
               e.cancel = true;
           }
       }

       var bkcolor = "#000";
       $(function () {
           $(".navmain td").hover(function () {
               bkcolor = $(this).attr("color");
               if (bkcolor != "#FFFFFF")
                    $(this).animate({ backgroundColor: "#C0C0C0" },1000);
           }, function () {
               $(this).animate({ backgroundColor: bkcolor }, 1000);
           });
       });

       //function adj() {
       //    var height = parseInt($(".ali-common-header").css("height").replace('px',''))*0.8;
       //    $(".flash-wrap img").css("height", height + 'px');
       //    var tabHeight = parseInt($(".mini-tabs-bodys").css("height").replace('px', ''));
       //    var H = screen.availHeight;
       //    //var tabHeight_mini = $(".mini-tabs-space").css("height");
       //    var tabH = H - height-200;// - tabHeight_mini;
       //    $(".mini-tabs-bodys").css("height", tabH + 'px');
       //    $(".mini-tabs-body").css("height", tabH + 'px');
       //}
    </script>

</body>
</html>
